package com.kuang.service;

import com.kuang.bean.Admin;
import com.kuang.bean.AdminExample;
import com.kuang.dao.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AdminServiceImpl implements AdminService{
    @Autowired
    private AdminMapper adminMapper;

    AdminExample adminExample = new AdminExample();
    AdminExample.Criteria criteria = adminExample.createCriteria();

    public void setAdminMapper(AdminMapper adminMapper) {
        this.adminMapper = adminMapper;
    }

    public int addAdmin(Admin admin) {
        return 0;
    }

    public int deleteAdminById(int id) {
        return 0;
    }

    public int updateAdmin(Admin admin) {
        return 0;
    }

    public Admin queryAdminById(int id) {
        return null;
    }

    public List<Admin> queryAllAdmin() {
        return null;
    }

    public List<Admin> qureyAdminByName(String adminName) {
        criteria.andAdminnameNotEqualTo(adminName);
        return adminMapper.selectByExample(adminExample);
    }
}
